package com.glsc.ngateway.common.base.repo.mysql.opmanage.report.excel;

import com.glsc.ngateway.common.base.domain.mysql.opmanage.report.excel.GltbFundPosition;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
public interface GltbFundPositionRepo extends JpaRepository<GltbFundPosition, Long>, JpaSpecificationExecutor<GltbFundPosition> {
    @Transactional
    @Modifying
    @Query(value = "delete from glsc_data.t_gltb_fund_position t where t.fc_date = :date",nativeQuery = true)
    void deleteByDate(@Param("date") String date);
}
